package com.zx.cloud.controller;

import java.math.BigDecimal;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zx.cloud.ApiVersion;
import com.zx.cloud.RequestLogging;
import com.zx.cloud.Shift;
import com.zx.cloud.common.filter.CurrentUserId;
import com.zx.cloud.common.filter.IgnoreAuth;
import com.zx.cloud.domain.Dict;
import com.zx.cloud.domain.Edition;
import com.zx.cloud.domain.LoanOrder;
import com.zx.cloud.domain.RepayOrder;
import com.zx.cloud.model.response.ObjectDataResponse;
import com.zx.cloud.service.DictService;
import com.zx.cloud.service.EditionService;
import com.zx.cloud.service.LoanOrderService;
import com.zx.cloud.service.RepayOrderService;
import com.zx.cloud.util.Page;

import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

/**
 * 
 * @ClassName: LoanOrderController
 * @Description: app版本管理
 * @author: Administrator
 * @date: 2017年10月30日 下午4:18:37
 */
@RestController
@RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/app")
public class EditionController{
	private static final Logger logger=Logger.getLogger(EditionController.class);
	static final SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
	@Autowired
	private EditionService editionService;
	
	@IgnoreAuth
	@RequestLogging
	@ApiOperation(value = "获取app版本", notes = "获取app版本")
	@RequestMapping(value = "/getAppVersion", method = RequestMethod.POST)
	@ResponseBody
	public ObjectDataResponse<List<Edition>> getAppVersion(@ApiParam(hidden=true,name="登录用户ID")@CurrentUserId Long userId,@RequestBody Edition edition){
		 List<Edition> editionsList=editionService.getAppVersion(edition);
		return new ObjectDataResponse<List<Edition>>(editionsList);
	}
	
}
